from django.conf.urls import url
from apps.users import views

urlpatterns = [
    url(r'^register/$', views.RegisterView.as_view(), name='register'),
    url(r'^username/(?P<username>[a-zA-Z0-9_-]{5,20})/count/$', views.UsernameCountView.as_view(), name='usernamecount'),
    url(r'^mobiles/(?P<mobile>1[3-9]\d{9})/count/$', views.MobileCountView.as_view(), name='mobilecount'),
    url(r'^login/$', views.UserView.as_view(), name='login'),
    url(r'^find_password/$', views.ChangePWDView.as_view(), name='changepwd'),
    url(r'^accounts/(?P<username>[a-zA-Z0-9_-]{5,20})/sms/token/$', views.COPWDView.as_view(), name='CPWDFir'),
    url(r'^accounts/(?P<username>[a-zA-Z0-9_-]{5,20})/password/token/$', views.CTwoPWDView.as_view(),
        name='CPWDSec'),
    url(r'^users/(?P<user_id>\d+)/password/$', views.CFinPWDView.as_view(), name='CPWDFin'),
    url(r'^user_center_info/$', views.UserCenterView.as_view(), name='userinfo'),
]